<HTML>
<HEAD>
<TITLE>JavaScript Source Code 3000:  Calendars:  Date Images</TITLE>
<META HTTP-EQUIV="JavaScript Source Code 3000" CONTENT = "no-cache">
<META NAME="date" CONTENT="2000-09-09">
<META NAME="channel" CONTENT="Web Developer">
<META NAME="author" CONTENT="Jeff Harding (jbh@site-ations.com)">
<META NAME="section" CONTENT="Calendars">
<META NAME="description" CONTENT="Displays the current date using images.  This allows you to be more creative and use any images you want, such as images that match the color or theme of your site.">

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Jeff Harding (jbh@site-ations.com) -->
<!-- Web Site:  http://www.site-ations.com -->

<!-- Day images (c): http://www.site-ations.com -->
<!-- Month images (c): http://www.bruce-hamilton.com -->




<!-- Begin
theDate= new Date();
months = new Array();
days = new Array();
months[1] ="../img/date-images/jan.gif";
months[2] ="../img/date-images/feb.gif";
months[3] ="../img/date-images/mar.gif";
months[4] ="../img/date-images/apr.gif";
months[5] ="../img/date-images/may.gif";
months[6] ="../img/date-images/jun.gif";
months[7] ="../img/date-images/jul.gif";
months[8] ="../img/date-images/aug.gif";
months[9] ="../img/date-images/sep.gif";
months[10] ="../img/date-images/oct.gif";
months[11] ="../img/date-images/nov.gif";
months[12] ="../img/date-images/dec.gif";
days[1] ="../img/date-images/1st.gif";
days[2] ="../img/date-images/2nd.gif";
days[3] ="../img/date-images/3rd.gif";
days[4] ="../img/date-images/4th.gif";
days[5] ="../img/date-images/5th.gif";
days[6] ="../img/date-images/6th.gif";
days[7] ="../img/date-images/7th.gif";
days[8] ="../img/date-images/8th.gif";
days[9] ="../img/date-images/9th.gif";
days[10] ="../img/date-images/10th.gif";
days[11] ="../img/date-images/11th.gif";
days[12] ="../img/date-images/12th.gif";
days[13] ="../img/date-images/13th.gif";
days[14] ="../img/date-images/14th.gif";
days[15] ="../img/date-images/15th.gif";
days[16] ="../img/date-images/16th.gif";
days[17] ="../img/date-images/17th.gif";
days[18] ="../img/date-images/18th.gif";
days[19] ="../img/date-images/18th.gif";
days[20] ="../img/date-images/20th.gif";
days[21] ="../img/date-images/21st.gif";
days[22] ="../img/date-images/22nd.gif";
days[23] ="../img/date-images/23rd.gif";
days[24] ="../img/date-images/24th.gif";
days[25] ="../img/date-images/25th.gif";
days[26] ="../img/date-images/26th.gif";
days[27] ="../img/date-images/27th.gif";
days[28] ="../img/date-images/28th.gif";
days[29] ="../img/date-images/29th.gif";
days[30] ="../img/date-images/30th.gif";
days[31] ="../img/date-images/31st.gif";
function printDate() {
document.write('<img src="' + months[theDate.getMonth()+1] + '">'); // month
document.write('<br>');
document.write('<img src="' + days[theDate.getDate()] + '">'); // day
}
//  End -->
</script>
</HEAD>

<BODY BGCOLOR=#ffffff vlink=#0000ff>

<BR>
<center>
<table width=600 cellpadding=0 cellspacing=10>
<tr>
<td width=468 align=center>

    
    
</td>
<td width=120 align=center>
    
</td>
</tr>
</table>
<BR>
<BR>
<basefont size=3>
<FONT SIZE="+2" FACE="Helvetica,Arial">
<A HREF="../index.htm" /" TARGET="_top"><FONT COLOR="#0000FF"><b>Home</b></font></A>
<img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}">
<A HREF="index.htm" /calendars/"><font color="#FF0000"><b>Calendars</b></font></A>
<img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}">
<FONT COLOR="#006666"><b>Date Images</b></font></font>
<BR>
<BR>
<table BORDER=0 WIDTH=486 CELLPADDING=3 CELLSPACING=0>
<tr><td><font FACE="helvetica,arial,geneva">
<br>
<br>
<!-- Description --><!--content_start-->
Displays the current date using images.  This allows you to be more creative and use any images you want, such as images that match the color or theme of your site.
<hr>
</td></tr>
</table>
<!-- Demonstration -->
<center>

<script>
printDate();
</script>

<p>
<font face="arial, helvetica" size="-2">
Day images   (c) <a href="javascript:if(confirm('http://www.site-ations.com/  \n\nYou must be connected to the Internet to access this link.  \n\nDo you want to open it from the server?'))window.location='http://www.site-ations.com/'" tppabs="http://www.site-ations.com/">http://www.site-ations.com</a><br>
Month images (c) <a href="javascript:if(confirm('http://www.bruce-hamilton.com/  \n\nYou must be connected to the Internet to access this link.  \n\nDo you want to open it from the server?'))window.location='http://www.bruce-hamilton.com/'" tppabs="http://www.bruce-hamilton.com/">http://www.bruce-hamilton.com</a>
</font>
</center>

<br><br>
All the images you will need are included<br>
included below.  Download this .zip file,<br>
then upload the images in it to your server.<br><br>
<a href="../img/date-images/date-images.zip" /img/date-images/date-images.zip">Dowload date-images.zip</a><br><br>
<P>
<P>
<P>
<P>
<a name="source">
<table BORDER=0 WIDTH=486 CELLPADDING=3 CELLSPACING=0>
<tr><td BGCOLOR=yellow><font FACE="helvetica,arial,geneva"><b>JavaScript Source Code 3000:  Calendars:  Date Images</b>
<p>Simply click inside the window below, use your cursor to hilight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s).  The script is yours!!!
<br><br></font></td></tr>
<tr><td BGCOLOR=yellow ALIGN=CENTER>
<form NAME="copy">

<DIV align="center">
<input type=button value="Highlight All" onClick="javascript:this.form.txt.focus();this.form.txt.select();">&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE="text" NAME="total" VALUE="Script Size:  2.28 KB" size=24>
</DIV>

<textarea NAME="txt" ROWS=20 COLS=75 WRAP=VIRTUAL>

&lt;!-- THREE STEPS TO INSTALL DATE IMAGES:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document
  3.  Download the images and then upload them to your server  --&gt;

&lt;!-- STEP ONE: Paste this code into the HEAD of your HTML document  --&gt;

&lt;HEAD&gt;

&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!-- Original:  Jeff Harding (jbh@site-ations.com) --&gt;
&lt;!-- Web Site:  http://www.site-ations.com --&gt;

&lt;!-- Day images (c): http://www.site-ations.com --&gt;
&lt;!-- Month images (c): http://www.bruce-hamilton.com --&gt;

&lt;! &gt;
&lt;! &gt;

&lt;!-- Begin
theDate= new Date();
months = new Array();
days = new Array();
months[1] ="jan.gif";
months[2] ="feb.gif";
months[3] ="mar.gif";
months[4] ="apr.gif";
months[5] ="may.gif";
months[6] ="jun.gif";
months[7] ="jul.gif";
months[8] ="aug.gif";
months[9] ="sep.gif";
months[10] ="oct.gif";
months[11] ="nov.gif";
months[12] ="dec.gif";
days[1] ="1st.gif";
days[2] ="2nd.gif";
days[3] ="3rd.gif";
days[4] ="4th.gif";
days[5] ="5th.gif";
days[6] ="6th.gif";
days[7] ="7th.gif";
days[8] ="8th.gif";
days[9] ="9th.gif";
days[10] ="10th.gif";
days[11] ="11th.gif";
days[12] ="12th.gif";
days[13] ="13th.gif";
days[14] ="14th.gif";
days[15] ="15th.gif";
days[16] ="16th.gif";
days[17] ="17th.gif";
days[18] ="18th.gif";
days[19] ="18th.gif";
days[20] ="20th.gif";
days[21] ="21st.gif";
days[22] ="22nd.gif";
days[23] ="23rd.gif";
days[24] ="24th.gif";
days[25] ="25th.gif";
days[26] ="26th.gif";
days[27] ="27th.gif";
days[28] ="28th.gif";
days[29] ="29th.gif";
days[30] ="30th.gif";
days[31] ="31st.gif";
function printDate() {
document.write('&lt;img src="' + months[theDate.getMonth()+1] + '"&gt;'); // month
document.write('&lt;br&gt;');
document.write('&lt;img src="' + days[theDate.getDate()] + '"&gt;'); // day
}
//  End --&gt;
&lt;/script&gt;
&lt;/HEAD&gt;

&lt;!-- STEP TWO: Copy this code into the BODY of your HTML document  --&gt;

&lt;BODY&gt;

&lt;center&gt;

&lt;script&gt;
printDate();
&lt;/script&gt;

&lt;p&gt;
&lt;font face="arial, helvetica" size="-2"&gt;
Day images   (c) &lt;a href="http://www.site-ations.com"&gt;http://www.site-ations.com&lt;/a&gt;&lt;br&gt;
Month images (c) &lt;a href="http://www.bruce-hamilton.com"&gt;http://www.bruce-hamilton.com&lt;/a&gt;
&lt;/font&gt;

&lt;/center&gt;

&lt;!-- STEP THREE:  Download the images and upload them to your server --&gt;
&lt;!-- ../img/date-images/date-images.zip --&gt;

 

&lt;!-- Script Size:  2.28 KB --&gt;</textarea><br><font FACE="helvetica,arial,geneva"></font></td></tr>

</table>
</form>
</FONT>
</CENTER>


</center>
</body></html>
